You can reach Oberammergau by train from Munich central station München Hauptbahnhof, you have to take the train headed to Innsbruck a regional train that departs on daily basis and switch trains in the Murnau train station the train to Oberammergau is the only other train in the station, the trip from Murnau to Oberammergau shouldn't be a problem, since Oberammergau is the last station to be reached.
You may also reach Oberammergau by car, you would have to go to south Munich in order to the take the Autobahn A-95 south to the Ettal exit. From there on the B-23 to Oberammergau.